package com.lx.domain;

import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Data
@Table(name = "tb_user")
public class User {
    @Id
    @KeySql(useGeneratedKeys = true)
    private int id;
    private String user_name;
    private String password;
    private String name;
/*    private Integer age;
    private Integer sex;
    private Date brithday;
    private Date created;
    private Date updated;*/
    @Transient
    private String note;





/*    CREATE TABLE `tb_user` (
            `id` int(20) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(100) DEFAULT NULL COMMENT '用户名',
            `password` varchar(100) DEFAULT NULL COMMENT '密码',
            `name` varchar(100) DEFAULT NULL COMMENT '姓名',
            `age` int(10) DEFAULT NULL COMMENT '年龄',
            `sex` tinyint(1) DEFAULT NULL COMMENT '性别，1男性 2女性',
            `birthday` date DEFAULT NULL COMMENT '出生日期',
            `note` varchar(255) DEFAULT NULL COMMENT '备注',
            `created` datetime DEFAULT NULL COMMENT '创建时间',
            `updated` datetime DEFAULT NULL COMMENT '更新日期',
    PRIMARY KEY (`id`),
    UNIQUE KEY `username` (`user_name`)
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8*/
}
